23. Fine-tuning CNNs for Classification Exercise

Fine-tuning CNNs for Classification Exercise

In this exercise, we'll focus on how to take an existing CNN architecture with weights that have been optimized for a general image classification task, and fine-tune it for a specific medical imaging task.

We'll work with the VGG16 architecture, using weights that have been trained in ImageNet. We'll walk through three different ways to use its architecture and fine-tune it to be used for classification of dense vs. fatty breast tissue on mammogram images.

The three scenarios for you to try are the following:

  1. Freeze all layers except for the final convolutional layer of VGG16
  2. Freeze all layers except the final convolutional layer of VGG16, and add several dense (fully connected) layers
  3. Freeze all layers except the final convolutional layer of VGG16, and add several dense (fully connected) layers with dropout

Note: the purpose of this exercise is not to get great performance. We are not providing you nearly enough training and testing data for that. The purpose of this exercise is to get familiar with different ways to fine-tune existing architectures. To that end, just run each model architecture for 5 epochs or so with the small amount of training and validation data.

Code

If you need a code on the https://github.com/udacity.